|
Kameleon-Plus
0.3.2
|
#include <CDFFileReader.h>


Public Member Functions | |
| CDFFileReader () | |
| std::vector< float > * | getVariable (const std::string &variable) |
| Returns a pointer to a std::vector<float> containing the values of the selected variable. | |
| std::vector< float > * | getVariable (long variableID) |
| std::vector< float > * | getVariable (const std::string &variable, long startIndex, long count) |
| std::vector< float > * | getVariable (long variableID, long startIndex, long count) |
| float | getVariableAtIndex (const std::string &variable, long index) |
| Returns a value in the flat array of the variable and index requested. | |
| float | getVariableAtIndex (long variable_id, long index) |
| std::vector< int > * | getVariableInt (const std::string &variable) |
| int | getVariableIntAtIndex (const std::string &variable, long index) |
| Returns a value in the flat array of the variable and index requested. | |
| int | getNumberOfGlobalAttributes () |
| int | getNumberOfVariables () |
| int | getNumberOfVariableAttributes () |
| long | getNumberOfRecords (const std::string &variable) |
| long | getNumberOfRecords (long variable_id) |
| long | getVariableID (const std::string &variable) |
| std::string | getVariableName (long variable_id) |
| Attribute | getGlobalAttribute (long i) |
| std::string | getGlobalAttributeName (long attribute_id) |
| std::string | getVariableAttributeName (long attribute_id) |
| Attribute | getGlobalAttribute (const std::string &attribute) |
| long | getGlobalAttributeID (const std::string &attribute) |
| Attribute | getVariableAttribute (const std::string &variable, const std::string &attribute) |
| std::vector< std::string > | getVariableAttributeNames () |
| bool | doesAttributeExist (const std::string &attribute) |
| bool | doesVariableExist (const std::string &variable) |
| bool | doesAttributeExist (long attribute) |
| bool | doesVariableExist (long variable) |
| const std::string & | getCurrentFilename () |
| virtual | ~CDFFileReader () |
Public Member Functions inherited from ccmc::FileReader | |
| FileReader () | |
| long | open (const std::string &filename, bool readonly=true) |
| void | addVariableName (const std::string &variable, long id) |
| long | close () |
| virtual | ~FileReader () |
Protected Member Functions | |
| long | closeFile () |
| long | openFile (const std::string &filename, bool readonly=true) |
| void | initializeGlobalAttributes () |
| void | initializeVariableAttributes () |
| void | initializeVariableIDs () |
| void | initializeVariableNames () |
Protected Member Functions inherited from ccmc::FileReader | |
| void | initializeGlobalAttributes () |
| void | initializeVariableAttributes () |
Additional Inherited Members | |
Static Public Attributes inherited from ccmc::FileReader | |
| static const long | OK = 0L |
| static const long | OPEN_ERROR = -1L |
| static const long | FILE_DOES_NOT_EXIST = -2L |
| static const long | VARIABLE_DOES_NOT_EXIST = -3L |
| static const long | ATTRIBUTE_DOES_NOT_EXIST = -4L |
| static const long | LOAD_FAILED = -5L |
| static const long | UNABLE_TO_ALLOCATE_MEMORY = -6L |
| static const long | VARIABLE_NOT_IN_MEMORY = -7L |
| static const long | MODEL_NOT_SUPPORTED = -8L |
| static const long | NOT_A_VALID_KAMELEON_FILE = -9L |
Protected Attributes inherited from ccmc::FileReader | |
| std::string | current_filename |
| int | numGAttributes |
| int | numVAttributes |
| boost::unordered_map < std::string, long > | variableIDs |
| boost::unordered_map< long, std::string > | variableNames |
| boost::unordered_map < std::string, Attribute > | gAttributes |
| boost::unordered_map< long, Attribute > | gAttributeByID |
| boost::unordered_map < std::string, boost::unordered_map < std::string, Attribute > > | vAttributes |
| ccmc::CDFFileReader::CDFFileReader | ( | ) |
Default constructor. Does nothing.
|
virtual |
Destructor
|
protectedvirtual |
Closes the currently selected file. Call this from the close() method.
Implements ccmc::FileReader.
|
virtual |
| bool ccmc::CDFFileReader::doesAttributeExist | ( | long | attribute | ) |
| attribute |
|
virtual |
| bool ccmc::CDFFileReader::doesVariableExist | ( | long | variable | ) |
| variable |
|
virtual |
|
virtual |
| i | The attribute number |
Implements ccmc::FileReader.

|
virtual |
|
virtual |
|
virtual |
|
virtual |
TODO Retrieves the number of global attributes in the selected file. This is useful for iterating over all available global attributes.
Implements ccmc::FileReader.
|
virtual |
|
virtual |
|
virtual |
Gets the number of variable attributes.
Implements ccmc::FileReader.
|
virtual |
Implements ccmc::FileReader.
|
virtual |
Returns a pointer to a std::vector<float> containing the values of the selected variable.
This allocates a new std::vector<float> pointer. Make sure you delete the contents when you done using it, or you will have a memory leak.
| variable |
Implements ccmc::FileReader.

|
virtual |
Returns a pointer to a std::vector<float> containing the values of the selected variable stored in the selected file. This allocates a new std::vector<float> pointer. Make sure you delete the contents when you done using it, or you will have a memory leak.
| variable |
Implements ccmc::FileReader.

|
virtual |
Returns a pointer to a std::vector<float> containing the values of the selected variable in the range specified by the startIndex and count (the number of records to read) stored in the selected file. This allocates a new std::vector<float> pointer. Make sure you delete the contents when you done using it, or you will have a memory leak.
| variable | |
| startIndex | |
| count |
Implements ccmc::FileReader.

|
virtual |
Returns a pointer to a std::vector<float> containing the values of the selected variable in the range specified by the startIndex and count (the number of records to read) stored in the selected file. This allocates a new std::vector<float> pointer. Make sure you delete the contents when you done using it, or you will have a memory leak.
| variableID | |
| startIndex | |
| count |
Implements ccmc::FileReader.

|
virtual |
Returns a value in the flat array of the variable and index requested.
Use this method on variables that have a type of float
| variable | The variable in the file |
| index | The index in the variable's array in the file |
Implements ccmc::FileReader.
|
virtual |
|
virtual |
| variable | |
| vattribute |
Implements ccmc::FileReader.

|
virtual |
| attribute_id |
Implements ccmc::FileReader.
|
virtual |
Implements ccmc::FileReader.
|
virtual |
Returns the variable ID as a long. Using the variable ID wherever possible is significantly faster than the equivalent methods accepting the variable string.
Implements ccmc::FileReader.
|
virtual |
This allocates a new std::vector<int> pointer. Make sure you delete the contents when you done using it, or you will have a memory leak.
| variable |
Implements ccmc::FileReader.

|
virtual |
Returns a value in the flat array of the variable and index requested.
Use this method on variables that have a type of int
| variable | The variable in the file |
| index | The index in the variable's array in the file |
Implements ccmc::FileReader.
|
virtual |
Returns the string representation of the variable referred to by variable_id
Implements ccmc::FileReader.
|
protected |
|
protected |
|
protectedvirtual |
Helper method to initialize a map containing variable IDs. This solves some issues with threaded operations on CDF files.
Implements ccmc::FileReader.
|
protectedvirtual |
Helper method to initialize a variable names map. This solves some issues with threaded operations on CDF files.
Implements ccmc::FileReader.
|
protectedvirtual |
Opens a new file. If the previous file has been opened successfuly, and has the same filename as the requested filename, nothing will be done.
| filename |
Implements ccmc::FileReader.

1.8.3